package gui;

import gui.GamesPanel.MyComboBoxEditor;

import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.border.TitledBorder;

import domain.models.GamesTableModel;
import domain.models.RankingTableModel;

public class RankingPanel extends JPanel {
	
	private Frame frame;
	private GuiController guiController;
	
	private JTable rankingTable;
	
	public RankingPanel(Frame frame)
	{
		super();
		this.frame = frame;
		this.guiController = frame.getGuiController();
		
		initGUI();
	}

	private void initGUI() {
		rankingTable = new JTable(new RankingTableModel(guiController.getDomainController()));

		JScrollPane scrollableRankingTable = new JScrollPane(rankingTable);
		scrollableRankingTable.setVisible(true);
		scrollableRankingTable.setBorder(new TitledBorder("Klassement"));
		
		this.add(scrollableRankingTable);
	}

}
